import { createApp } from 'vue'
import App from './App.vue'
import http from './http/index'
import router from './router/index'
import vuex from './vuex/index'
import hello from './plugins/index'
import 'vant/lib/index.css';
const vue = createApp(App)
vue.use(router)
vue.use(vuex)
vue.use(hello)
router.beforeEach((to,from,next)=>{
  console.log(to)
  console.log(from)
  if(to.path === '/') {
    next({path: '/login'})
  }
  next()
})
router.afterEach((to,from)=>{
  console.log(to)
  console.log(from)
})
vue.config.globalProperties.$http =  http;
vue.mount('#app')
